1. Field of the Invention
The present invention generally relates to interaction with services provided by the operating system in a computer. More particularly, the present invention relates to a method and apparatus for storing information that identifies the state of a particular client's, or user's, interaction with operating system services.
2. State of the Art
A computer's operating system typically provides a variety of different services that are called upon by clients, e.g. application programs and other processes, to perform functions that may relate to hardware components of the computer system, or other software programs. For instance, the file system permits a client to retrieve files from a local hard disk drive to open them within an application program, as well as store them back on the disk drive when they are closed. Another example of an operating system service is a color picker, which enables a client to vary colors which are displayed on a computer monitor and/or printed on a printer.
Many operating system services require, or at least permit, a client to provide input which determines how the function of the service is to be carried out. For instance, when a file is to be opened in an application program, the client is provided with a choice of available storage locations, and files within that location, from which to select. Similarly, a color picker may provide sliders, or other types of control elements, which enable the user to adjust the colors on a display. These types of services typically have a user interface associated with them, via which the user can provide the necessary input. Other types of operating system services may not require explicit user input, and therefore normally do not have a corresponding user interface. For instance, the operating system may want to keep track of a user name and password for a server, to provide for automatic reconnection.
One example of a user interface that is provided when an application program issues a call to open or save files comprises a visual display of a directory and its contents. The user selects a file to be operated on by the application program, by clicking on a representation of the file in the visual display of the user interface. Typically, information concerning the directory displayed in the user interface is stored when the access to the operating system service terminates, e.g. the user exits the user interface. The next time the application program calls that service, the operating system causes the user interface to display the most-recently stored directory.
There are many operating system services which are called by multiple different clients. For instance, the file system service may be called by a text editing portion of a word processor, and then called by the dictionary portion of the same word processor, or by an entirely different application program. When the text portion of the word processor calls the file system again, its user interface will display the contents of the last directory that had been accessed. Thus, if the most recent call to the file system was from the dictionary portion of the word processor, the user interface might display a list of dictionary files. The user must then manipulate the user interface so that it displays the directory containing the desired text files. This can be a time-consuming annoyance to the user.
Additionally, when a desired directory is displayed to the user, the display typically occurs at a default location in the directory. For example, if files are displayed in alphabetical order, the files which initially appear are those whose names begin with A, B, C, etc. Consequently, a user may have to scroll down the user interface to find a previously selected object. If a directory contains a long list of files this can take some time.
It is desired to provide an improved method and apparatus for storing state information relating to operating system services across invocations of the services, to ensure correct operation of services, as well as to make the access to such services more convenient for the client.